package com.block.product.service.utils;

import cn.hutool.core.util.StrUtil;
import com.block.common.enums.BaseTypeInfoEnum;
import jnr.ffi.annotations.In;

/**
 * @author hekelong
 * @date 2025/11/5 17:32
 */
public class CheDiRongUtils {

    public static String getLoanAmount(String loanAmount) {
        if (BaseTypeInfoEnum.LoanAmount.la001.getValue().equals(loanAmount)) {
            return "1";
        }
        if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la002.getValue(), loanAmount)) {
            return "2";
        }
        if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la003.getValue(), loanAmount)) {
            return "3";
        }
        if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la004.getValue(), loanAmount)) {
            return "4";
        }
        return "5";
    }


    public static String getJob(String gongzuo) {
        if (StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz003.getValue(), gongzuo)) {
            return "1";
        }
        if (StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz001.getValue(), gongzuo)) {
            return "2";
        }
        if (StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz004.getValue(), gongzuo)) {
            return "3";
        }
        if (StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz002.getValue(), gongzuo)) {
            return "4";
        }
        return "0";
    }

    public static String getZhiMa(String zhima) {
        if (StrUtil.equals(BaseTypeInfoEnum.Zhima.zm001.getValue(), zhima)) {
            return "0";
        }
        if (StrUtil.equals(BaseTypeInfoEnum.Zhima.zm004.getValue(), zhima)) {
            return "1";
        }
        if (StrUtil.equals(BaseTypeInfoEnum.Zhima.zm003.getValue(), zhima)) {
            return "2";
        }
        if (StrUtil.equals(BaseTypeInfoEnum.Zhima.zm002.getValue(), zhima)) {
            return "3";
        }
        return "4";
    }

    public static String getGjj(String gjj) {
        if (StrUtil.equals(BaseTypeInfoEnum.Gjj.gjj001.getValue(), gjj)) {
            return "0";
        }
        return "1";
    }

    public static String getSheBao(String shebao) {
        if (StrUtil.equals(BaseTypeInfoEnum.Shebao.sb001.getValue(), shebao)) {
            return "0";
        }
        return "1";
    }

    public static String getBaoXian(String baoxian) {
        if (StrUtil.equals(BaseTypeInfoEnum.Baoxian.bx001.getValue(), baoxian)) {
            return "0";
        }
        return "1";
    }

    public static String getCar(String car) {
        if (StrUtil.equals(BaseTypeInfoEnum.Car.car001.getValue(), car)) {
            return "0";
        }
        return "1";
    }

    public static String getHouse(String house) {
        if (StrUtil.equals(BaseTypeInfoEnum.House.hu001.getValue(), house)) {
            return "0";
        }
        return "1";
    }

    public static String getYuqi(String yuqi) {
        if (StrUtil.equals(BaseTypeInfoEnum.Yuqi.yq001.getValue(), yuqi)) {
            return "2";
        }
        return "1";
    }
}
